#pragma once
#include "PDTNode.h"

class PDTUnaryOp {
private:
	UnaryOpEnum operatorType;
public:
	PDTUnaryOp(UnaryOpEnum typeEnum) :
		operatorType(typeEnum) {
	}

	UnaryOpEnum getType() {
		return operatorType;
	}

	bool isUnaryMinus()
	{
		return (operatorType == UnaryMinus);
	}

	bool isUnaryPlus()
	{
		return (operatorType == UnaryPlus);
	}

	stringstream& toString(stringstream& ss) const {
		if (operatorType == UnaryMinus)
			ss << "- ";
		else if (operatorType == UnaryPlus)
			ss << "+ ";
		return ss;
	}

	static PDTUnaryOp PDTUnaryMinus;
	static PDTUnaryOp PDTUnaryPlus;
};
